package com.example.cmh.service;

import com.example.cmh.common.CustomException;
import com.example.cmh.common.PageResult;
import com.example.cmh.common.Result;
import com.example.cmh.pojo.News;

import java.util.List;

public interface NewsService {
    Result<String> addNews(News news, Integer currentUserId) throws CustomException;
    Result<String> updateNews(Boolean isAdmin, News news) throws CustomException;
    Result<String> deleteNews(Integer newsId) throws CustomException;
    Result<List<News>> searchNews(String newsTitle, String author, String newsSummary, String newsImagePath, Integer currentUserId) throws CustomException;
    Result<News> getNewsDetail(Integer newsId) throws CustomException;
    Result<PageResult<News>> getNewsListWithPage(String newsTitle, String author, String newsSummary, Integer currentUserId, Integer current) throws CustomException;
    Result<String> reviewNews(Integer newsId, Integer status) throws CustomException;
} 